import Vue from 'vue'
import App from './App'
import HttpRequest from './common/httpRequest'
import HttpCache from './common/cache'
import queue from './common/queue'
import loadMore from './components/uni-pro/load-more'
import orangeGoodsList from './components/uni-pro/orange-goods-list'
import orangeGoodsCarg from './components/uni-pro/orange-goods-card'
import orangeHandpick from './components/uni-pro/orange-handpick'
import orangeNews from './components/uni-pro/orange-news'

import orangeGoodsCargHome from './components/uni-pro/orange-goods-card-home'
import empty from './components/empty'

/* 极光插件 */
import { JjimWidget } from './js_sdk/jiguang_jim.js'
import cuCustom from './colorui/components/cu-custom.vue'
Vue.component('cu-custom',cuCustom)
Vue.use(new JjimWidget());
// uview-ui插件
import uView from 'uview-ui';
Vue.use(uView);


Vue.config.productionTip = false;
Vue.prototype.$Request = HttpRequest;
Vue.prototype.$queue = queue;


import 'js_sdk/ican-H5Api/ican-H5Api'
Vue.prototype.$Sysconf = HttpRequest.config;
Vue.prototype.$SysCache = HttpCache;


Vue.prototype.$eventHub = new Vue(); //设置一个监听
/* 
  $eventHub , fire 可自定义 $on是开启监听
  this.$eventHub.$on('fire', function (data) {
   	console.log('fire - '+data);
	//$off是关闭监听
  	this.$eventHub.$off('fire');
	
	赋值页面 --可在其他页面赋值--使用 $on监听取值
	this.$eventHub.$emit('fire','datadddddddddd');
	
  }); 
 
 
 */

App.mpType = 'app';

Vue.component('orange-news', orangeNews);
Vue.component('orange-handpick', orangeHandpick);

Vue.component('load-more', loadMore);

Vue.component('empty', empty);
Vue.component('orange-goods-list', orangeGoodsList);
Vue.component('orange-goods-card', orangeGoodsCarg);
Vue.component('orange-goods-card-home', orangeGoodsCargHome);


const app = new Vue({
    ...App
});
app.$mount();
